package com.studyhub.api.problem.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 问题展示VO
 * 
 * @author StudyHub Team
 */
@Data
@Schema(name = "ProblemVO", description = "问题展示信息")
public class ProblemVO {

    @Schema(description = "问题ID")
    private Long id;

    @Schema(description = "发布用户ID")
    private Long userId;

    @Schema(description = "发布用户昵称")
    private String userNickname;

    @Schema(description = "发布用户头像")
    private String userAvatar;

    @Schema(description = "问题标题")
    private String title;

    @Schema(description = "问题内容")
    private String content;

    @Schema(description = "问题标签列表")
    private List<TagVO> tagList;

    @Schema(description = "浏览次数")
    private Integer viewCount;

    @Schema(description = "回答数量")
    private Integer answerCount;

    @Schema(description = "点赞数量")
    private Integer likeCount;

    @Schema(description = "收藏数量")
    private Integer collectCount;

    @Schema(description = "是否已解决：0-未解决，1-已解决")
    private Integer isSolved;

    @Schema(description = "最佳答案ID")
    private Long bestAnswerId;

    @Schema(description = "当前用户是否已点赞")
    private Boolean isLiked;

    @Schema(description = "当前用户是否已收藏")
    private Boolean isCollected;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;
}
